package tt.dz.egobus.servicemanager.service;

import tt.dz.egobus.servicemanager.base.service.ExtendBaseService;
import tt.dz.egobus.servicemanager.entities.BusRegisterService;

import java.util.List;

/**
 * @author Anson
 * @date 17-3-14
 * @name
 * @since 1.0.1
 */
public interface BusRegisterServiceService extends ExtendBaseService<BusRegisterService, String> {

    /**
     * @param isValidate 更新有效状态
     * @param busId      车辆id [可选]
     * @param serviceId  车辆服务id [可选]
     * @author Anson
     * @date 17-3-17
     * @name 跟新有效状态
     * @since 1.0.1
     */
    void updateIsValidateStatus(boolean isValidate, String busId, String serviceId);

    /**
     * @param busId
     * @author Anson
     * @date 17-3-28
     * @name 查询当前车注册的业务服务号
     * @since 1.0.3
     */
    int[] queryBusinessCodeByBusId(String busId);

    /**
     * @param businessCode 业务服务号
     * @param busId        车辆id
     * @author Anson
     * @date 17-4-1
     * @name
     * @since 1.0.3
     */
    double getServiceFeeByBusIdBusinessCode(String busId, int businessCode);

    /**
     * @param busId 车辆id
     * @author Anson
     * @date 17-4-17
     * @name 根据车辆id查询当前车辆可以绑定服务类型
     * @since 1.0.4
     */
    List<tt.dz.egobus.servicemanager.entities.BusService> queryBusAbleBindServices(String busId);

    /**
     * @param busId 车辆信息
     * @author Anson
     * @date 17-5-22
     * @name 删除车辆绑定关系
     * @since 1.0.4
     */
    int deleteRelativeByBusId(String busId);

    /**
     * @param busId            当前车辆信息
     * @param isFilterValidate 是否需要过滤有效的关系
     * @author Anson
     * @date 17-5-22
     * @name 当前车辆是否存在服务注册关系
     * @since 1.0.4
     */
    void validateServiceRelative(String busId, boolean isFilterValidate);
}
